package com.bush.mall.member.controller;

import com.bush.mall.common.entity.Result;
import com.bush.mall.member.feign.CouponFeignClient;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("test")
public class TestController {

    @Resource
    private CouponFeignClient couponFeignClient;

    @Value("${sys.user.name}")
    private String username;

    @GetMapping
    public Result getCoupon(){
        System.out.println(username);
        return couponFeignClient.memberCoupon();
    }


}
